home *** CD-ROM | disk | FTP | other *** search
- Path: ccshst05.cs.uoguelph.ca!ccshst01!thay
- From: thay@uoguelph.ca (Toby K Hay)
- Newsgroups: comp.lang.c
- Subject: Re: need random-# generator source (please!)
- Date: 30 Mar 1996 14:52:50 GMT
- Organization: University of Guelph
- Message-ID: <4jjhs2$d5a@ccshst05.cs.uoguelph.ca>
- References: <315cee22.18443869@news>
- NNTP-Posting-Host: ccshst01.cs.uoguelph.ca
- X-Newsreader: TIN [version 1.2 PL2]
-
- Joseph Cheek (josephc@intele.net) wrote:
- : I need source to a random-number generator that will produce severely different
- : numbers when called several times in quick succession. Please help -- where
- : can I find this? TIA
-
- If rand() isn't good enough you could look for r250.zip on the net. I
- got it by FTP from simtel/msdos/c at oak.oakland.edu. But do you really
- need it? I'm quite sure that the time between calls to rand() makes no
- difference to the sequence of pseudo-random numbers it returns. Now, if
- you made the mistake of calling srand() more than once and using a time
- argument then two calls in quick succession will cause repeated random
- numbers because the time seed will have been the same. One call to
- srand() should be enough in any program.
- Toby Hay thay@uoguelph.ca
-